package com.yunxi.dealer.service;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.web.ApiResult;
import com.yunxi.core.web.LoginInfo;
import com.yunxi.dealer.pojo.PartnerAreaVO;
import com.yunxi.dealer.pojo.PartnerStatusVO;
import com.yunxi.dealer.pojo.PartnerVO;
import com.yunxi.sys.pojo.UserVO;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * <p>
 * 渠道商信息 服务类
 * </p>
 *
 * @author
 * @since 2019-05-13
 */
public interface PartnerDubboService {

   PartnerVO getById(String id) throws InvocationTargetException, IllegalAccessException;

   ApiResult saveOrUpdate(PartnerVO partnerVO, LoginInfo loginInfo) throws Exception;

   void removeById(String id) throws Exception;

   PageInfo<PartnerVO> findPageByVO(PartnerVO partnerVO, Integer pageNum, Integer pageSize) throws InvocationTargetException, IllegalAccessException;

   PartnerVO load(String partnerCode,String tenantId);

   PageInfo<PartnerVO> findPageByVO2(PartnerVO partnerVO, Integer pageNum, Integer pageSize);

   List listByVo(PartnerVO v);

   PartnerVO getByUser(UserVO user);

   PartnerVO getCasById(String partnerId);

   List listSel(PartnerVO v);

   ApiResult updateBatch(List<PartnerStatusVO> ids, LoginInfo loginInfo) throws Exception;

   PageInfo pageSel(PartnerVO v, Integer pageNum, Integer pageSize);

   ApiResult updateBatchArea(List<PartnerAreaVO> partnerAreaVOList, LoginInfo loginInfo);

   ApiResult listByAreaCode(PartnerVO partnerVO,Integer pageNum, Integer pageSize);

   List<PartnerVO> listByAreaCodes(List<PartnerVO> partnerVOList);

   String leastPartner(String clueType, String province,String vehicleCode,String city);

   List<PartnerVO> listByProductAuth(String partnerCode, String productTypeCode);

   ApiResult saveOrUpdateByVip(PartnerVO partnerVO, boolean isFirst, LoginInfo loginInfo) throws Exception;

   PartnerVO getByPartnerCode(String vipNo);

    ApiResult exportPartner(PartnerVO partnerVO);
}
